package com.morgankelly.dao;

import javax.jdo.PersistenceManager;

import com.morgankelly.po.Tag;
import com.morgankelly.util.PMF;

public class TagDAO extends GenericDAO<Tag> {
	
	private static TagDAO instance = null;

	private TagDAO() {}

	public static synchronized TagDAO get() {
		if (instance == null) {instance = new TagDAO();}
		return instance;
	}
	
	public void update(Long id, String name) {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		 Tag entry = pm.getObjectById(Tag.class, id);
		 entry.setName(name);
	}
}
